package com.yn.courseselectionsystem.dao;

import com.yn.courseselectionsystem.pojo.CourseRecord;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

@Mapper
public interface CourseRecordDao {
    //选课   之   添加选课记录
    int addCourseRecord(CourseRecord courseRecord);

    //查找所以的选课记录  key==courseId  以map的方式
    @MapKey("courseId")
    public Map<Integer,CourseRecord> selCRMapKeyCourseIdAll();

    //退课之   修改选课记录为退课
    int upCRIfTheSelected(@Param("userId") Integer userId,@Param("courseId") Integer courseId);
}
